home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 487 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: netapp.com!not-for-mail
  2. From: guy@netapp.com (Guy Harris)
  3. Newsgroups: comp.arch,comp.lang.c
  4. Subject: Re: Did Microsoft decree a byte order?
  5. Date: 5 Jan 1996 11:43:30 -0800
  6. Organization: Network Appliance
  7. Message-ID: <4cjv12$rkk@bayonne.netapp.com>
  8. References: <4c80dp$9du@hobbes.sco.COM> <DKIp84.9Az@calcite.rhyolite.com> <jgkDKMn2x.2KA@netcom.com> <DKMx16.E2M@calcite.rhyolite.com>
  9. NNTP-Posting-Host: 192.9.200.18
  10. Keywords: byte
  11.  
  12. Vernon Schryver <vjs@calcite.rhyolite.com> wrote:
  13. >Contemplate the byte-order dependencies in the tar.  There are programs
  14. >that can read and write all of the common cpio and tar formats, and
  15. >these programs can be compiled to run on either big or little endian
  16. >machines.  Nevertheless, neither tar nor cpio use XDR or ANS.1.
  17.  
  18. Correct.
  19.  
  20. "tar" uses ASCII.
  21.  
  22. "cpio -c" uses ASCII.
  23.  
  24. "cpio" without "-c" uses binary, but, fortunately, there's a
  25. more-than-one-byte magic number at the front of a "cpio" archive, so a
  26. clueful "cpio" archive reader can look at the magic number and figure
  27. out whether the archive was written on a big-endian or little-endian
  28. machine.
  29.  
  30. >Yes, you often use ASCII, but only for trivial amounts of data
  31.  
  32. Such as "tar" and "cpio" control information?  Neither "tar" nor "cpio"
  33. use any machine-independent representation for file data, but I'm not
  34. sure it would be possible to *make* it do so, without having an
  35. "object-oriented file system" in which each file has a serialize method
  36. associated with it (i.e., "tar" or "cpio" in most OSes has no idea what
  37. format the file it's writing is in).
  38.